define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		//返回信息
		return {
			detail:function(apply_id,act_id,callback){
				Http.post({
					method:'payment.bondpay.detail',
					apply_id:apply_id,
					act_id:act_id
				},function(result){
					if(callback)
					callback(result.result);
				})
			},
			//支付
			dopay:function(apply_id,amount,user_args,image,bank_id,password,callback){
				Http.post({
					method:'payment.bondpay.dopay',
					status:apply_id,
					amount:amount,
					user_args:user_args,
					payPass:password,
					image:image,
					bank_id:bank_id
				},function(result){
					if(callback)
						callback(result);
				})
			}
			
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Panicauction_pay", factory);
});